// packageH/signPage/signIndex/signIndex.js
const app = getApp();

Page({
  data: {
    Member: {}
  },

  onLoad: function (options) {
   
  },
  onShow: function () {
    this._getData();
  },

  _getData () {
    let requestUrl = app.getNetAddresss('plugin.yun-sign.frontend.h5.member.get-info');
    let that = this;
    app._getNetWork({
      url: requestUrl,
      success (resdata) {
        let res = resdata.data;
        if (res.result === 1) {
          that.setData({
            Member: res.data
          });
        } else {
          app.tips(res.msg);
        }
      },
      fail (err) {
        console.log(err, "-----------");
      }
    });
  },


  // 页面跳转
  toSign () {
    if (this.data.Member.status === 1) {
      wx.navigateTo({
        url: '/packageH/signPage/signCompany/signCompany',
      });
    } else {
      wx.navigateTo({
        url: '/packageH/signPage/personBank/personBank',
      });
    }
  },

  toBills () {
    wx.navigateTo({
      url: '/packageH/signPage/contractBills/contractBills',
    });
  },

  toLists () {
    wx.navigateTo({
      url: '/packageH/signPage/contractList/contractList',
    });
  },

  toStaffs () {
    wx.navigateTo({
      url: '/packageH/signPage/staffManagement/staffManagement',
    });
  },

  toGoodList () {
    wx.navigateTo({
      url: '/packageB/member/category/search_v2/search_v2',
    });
  },

});